import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/login' },
  {
    path: '/login',
    component: () => import('@/views/login/login.vue')
  },
  {
    path: '/home',
    redirect: '/home/my',
    component: () => import('@/views/home/index.vue'),
    children: [
      { path: '/home/company', component: () => import('@/views/home/com/company') },
      { path: '/home/topic', component: () => import('@/views/home/com/topic') },
      {
        path: '/home/discover',
        component: () => import('@/views/home/com/discover')
      },
      { path: '/home/my', component: () => import('@/views/home/com/my') }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
